package com.android.memoprendiz.model;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class WordDAO {
	
	private Database dbManager;
	
	public WordDAO(Context context){
		this.dbManager = new Database(context);
	}
	
	public void saveWord(Word word, int index){
		SQLiteDatabase database = dbManager.getWritableDatabase(); 
		database.execSQL("INSERT INTO palavra VALUES ( null, '" +
				word.getNome() + " ', '" +
				word.getCaminho_img() + "', " +
				index +
				");"
		);	
		database.close();
	}
}